package com.itheima.Test;

/**
 * ClassName:Test
 * Package:com.itheima.Test
 * Description:
 * Date:2022/7/5 12:07
 * Author:liu.min
 */
public class Test {
    public static void main(String[] args) {
        new C().test3();
    }
}

abstract class A {

   abstract void test1();
    void test2(){
        test1();
    };

}

abstract class B extends A{
    @Override
    void test1(){
        System.out.println("重写方法");
    }

}
 class C extends B{
   void test3(){
       test2();
    }
}